﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Xc.DataAccess.Core.Extensions
{
    public static class ResultExtension
    {
        /// <summary>
        /// 是否全部成功
        /// </summary>
        /// <typeparam name="TOption"></typeparam>
        /// <typeparam name="TService"></typeparam>
        /// <param name="resultDatas"></param>
        /// <returns></returns>
        public static bool IsAllSuccess<TOption, TService>(this ResultData<TOption, TService>[] resultDatas)
        {
           return resultDatas.All(p => p.IsSuccess);
        }
    }

}
